package indi.caibo.service_edu.controller;

import indi.caibo.commonutils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @author Bo Cai
 * @version 1.0
 * @date 2021/10/4 16:41
 */
@Api(tags = "登录模块")
@RestController
@RequestMapping("/edu-service/user")
public class EduLoginController {
    @PostMapping("login")
    @ApiOperation("登录")
    public R login() {
        return R.ok().data("token", "admin");
    }

    @GetMapping("info")
    @ApiOperation("获取登录用户信息")
    public R info() {
        return R.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://caibo-0520.oss-cn-shenzhen.aliyuncs.com/avatar/finn.png");
    }
}
